﻿using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Data;
using System.Windows.Forms;
using THSERP.BusinessEntities;
using THSERP.BaseProvider;


namespace THSERP.Modules.TaxDec
{
    public partial class ARTaxDeclarationsGridControl : THSGridControl
    {
        public ARTaxDeclarationsGridControl()
        {
            InitializeComponent();
        }

        public ARTaxDeclarationsGridControl(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }

        public override void InitGridControlDataSource()
        {
            //base.InitGridControlDataSource();
            TaxDecEntities entity = (TaxDecEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource bds = new BindingSource();
            bds.DataSource = entity.ARTaxDeclarationsList;
            this.DataSource = bds;
        }
        protected override DevExpress.XtraGrid.Views.Grid.GridView InitializeGridView()
        {
            DevExpress.XtraGrid.Views.Grid.GridView gridView =base.InitializeGridView();
            gridView.Columns.AddField("AASelected");
            gridView.Columns["AASelected"].Caption = "Chọn";
            gridView.Columns["AASelected"].Visible = true;
            gridView.Columns["AASelected"].VisibleIndex = 0;
            return gridView;
        }

    }
}
